//
//  BaseViewController.swift
//  Venus
//
//  Created by qurongxiang on 2018/7/24.
//  Copyright © 2018年 zhaowang. All rights reserved.
//

import UIKit

class BaseViewController: UIViewController {

    lazy var navgationBar : MPNavigationBar = MPNavigationBar(frame: CGRect(x: 0, y: 0, width: LayoutCommon.width, height: LayoutCommon.isBangs() ? 88 : 64))
    
    lazy var navItem = UINavigationItem()
    
    
    override var title : String?{
        didSet{
            navItem.title = title
       }
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        navgationBar.clipsToBounds = true
        view.addSubview(navgationBar)
        navgationBar.items = [navItem]
        navgationBar.barTintColor = UIColor(hex: "17bbfe")
        navgationBar.titleTextAttributes =  [NSAttributedString.Key.foregroundColor: UIColor.white]
        navgationBar.tintColor = UIColor.orange
        navgationBar.isTranslucent = false        
    }

    deinit {
        //DDLOG(message: "销毁控制器:\(NSStringFromClass(classForCoder)) Name:\(String(describing: title))")
    }
    
}
